a = {'a': 'AA', 'b': 'bb'}
print(a['a'])
a['c']='cc'
print(a)
print(len(a))
a.pop('a')
print(a)
a.clear()
print(a)

a1 = {'a': 'AA', 'b': 'bb'}

#遍历key
for key in a1:
    print(key)

for key in a1.keys():
    print(key)
for v in a1.values():
    print(v)


for item in a1.items():
    print(item)
    print(item[0])
    print(item[1])


for k,v in a1.items():
    print(k,v)


aa={'w':'wwww','b':'rrrrrw'}

for v,k in aa.items():
    print(v,k)
